   cd, current = old_dir

   outputpath = old_dir + '/figures'
   if not file_test(outputpath) then file_mkdir, outputpath
   content = ''
   openr, lun, 'parameters',/get_lun
   while eof(lun) ne 1 do begin
      readf, lun, content
      if strpos(content, 'datavis_path') ne -1 then begin
         path_start = strpos(content, "'") + 1
         path_end = strpos(content, "'", /reverse_offset)
         datapath = old_dir + '/' + strmid(content, path_start, path_end - path_start)
      endif
   endwhile
   close, lun
   free_lun, lun

   xsize = 1200
   ysize = 900
   ps = 0
   char_color = 0
   line_color = 255
   background = 255
   rgb_table = -1
   ;plot_range = [-6, 6, 0, 9]

;   map_plot_2d, /mesh_flag, outputpath = outputpath, datapath = datapath, plot_range = plot_range,                                 $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table, /cpu_color
;   map_plot_2d, var_name = 'beta', outputpath = outputpath, datapath = datapath, plot_range = plot_range,                          $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table, /log
;   map_plot_2d, /mesh_flag, var_name = 'gp', outputpath = outputpath, datapath = datapath, plot_range = plot_range,                $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table
   map_plot_2d, var_name = 'gp', outputpath = outputpath, datapath = datapath, plot_range = plot_range, $
      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
      rgb_table = rgb_table, mag_lv = 25, arrow_len = 1.0, arrow_scl = 1, var_out = var, colorbar_flag = 1,                        $
      colorbar_format = '(f5.1)', mag_dir = 2, mag_pos_start = 0;, single_time = 100
;   map_plot_2d, var_name = 'gp', /mesh_flag, outputpath = outputpath, datapath = datapath,                                         $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table
;   map_plot_2d, var_name = 'ro', outputpath = outputpath, datapath = datapath,                   $
;      xsize = xsize, ysize = ysize, ps = ps, char_color = char_color, line_color = line_color, background = background,            $
;      rgb_table = rgb_table

   cd, old_dir

end
